﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("Enter a: ");
            int a = int.Parse(Console.ReadLine());


            Console.WriteLine("Enter b: ");
            int b = int.Parse(Console.ReadLine());


            Console.WriteLine("Enter c: ");
            int c = int.Parse(Console.ReadLine());

            double x1;
            double x2;

            double D = b * b - 4 * a * c;
            Console.WriteLine(D);

            if (D > 0)
            {
                x1 = (-b - Math.Sqrt(D)) / 2 * a;

                x2=(b+Math.Sqrt(D)) /2*a;

                Console.WriteLine("x1 =" + x1);
                Console.WriteLine("x2 =" + x2);
            }

            else if (D == 0)
            {
                x1 = -b / 2 * a;

                x2 = x1;

                Console.WriteLine("x1 =" + x1);
                Console.WriteLine("x2 =" + x2);

            }

            else
            {
                Console.WriteLine("x1, x2 do not exist");
            }



  


        }
    }
}
